In recent years, with the widespread of a communication network and an information-processing apparatus, the importance of database apparatuses increasingly rises up. For example, a database apparatus constitutes an information system together with a web server apparatus or an application server apparatus so as to be used for customer management or settlement process of e-commerce. Moreover, it becomes possible to control the database apparatuses not only in the structured query language (SQL) or other query languages, but also in the Java® language using Java® database connectivity (JDBC). Therefore, the database apparatuses have high compatibility with various application programs developed using the Java® language (Java® is a registered trademark).
Conventionally, there has been performed a transaction (an optimistic transaction) without exclusive control as a method of improving access efficiency in a database with a few access competitions. According to the optimistic transaction, there is no need to perform exclusive control for each data access in the transaction and therefore it is possible to improve the efficiency of accesses to database apparatuses.
However, when the optimistic transaction is performed, there is required a process as referred to as a verification in order to maintain matching of a database. The verification is a process for confirming that data referenced in the optimistic transaction has not been changed from the referenced value even when the data referenced in the optimistic transaction commits the processing matter of the transaction. A database apparatus commits the processing matter of the transaction on condition that the referenced data has not been changed, and does a rollback of the transaction if the data has been changed.
A technique for improving access efficiency in a database apparatus will be described below as a reference technique.
Conventionally, there has been suggested a technique for converting a query to a database to another efficient query by rewriting the query within a range of not changing the meaning of the query and sending the query to the database apparatus in response to the query to the database (refer to Nonpatent Document 1). This document, however, merely describes a general concept of improving the query to the database. For example, the document does not describe a concrete method of improving an efficiency of a plurality of transactions whose execution sequence is dynamically defined. In addition, the document does not describe a concrete method of optimizing a query using SQL. As an application of this technique, Patent Document 1 describes a technique for optimizing a plurality of commands sequentially issued. A technique described in Patent Document 1, however, is based on the premise of a database for managing data using a particular tree structure and an access to the database requires a particular query language. A technique described in Nonpatent Document 3 is also based on the premise of a particular query language and it is difficult to apply the technique to a database that is typical today. Moreover, Nonpatent Document 2 suggests a technique for caching a query result of a database on a storage device. The efficiency, however, is improved by the technique only when the same key is accessed in succession and thus it is impossible to improve the efficiency of a plurality of queries for which different keys are accessed.
Patent Document 1: U.S. Pat. No. 5,920,857 Efficient optimistic concurrency control and lazy queries for B-trees and other database structures.
Nonpatent Document 1: Timos K. Sellis, Multiple-Query Optimization, ACM Transactions on Database Systems, Vol. 13, No. 1, March 1988, Pages 23-52
Nonpatent Document 2: Surajit Chaudhuri, Ravi Krishnamurthy, Spyros Potamianos and Kyuseok Shim, Optimizing Queries with Materialized Views, ICDE 95
Nonpatent Document 3: Shivnath Babu and Jennifer Widom, Continuous Queries over Data Streams, SIGMOD Record, Vol. 30, No. 3, September 2001, Pages 109-120